define(function (require, exports, module) {
    var template = require('../../template/_archives.html');
    var ArticleManager = require('../service/article-manager');
    var EventBus = require('../service/event-bus');

    module.exports = {
        name: 'archives',
        data() {
            return {
                archives: []
            }
        },
        template,
        created() {
            this.archives = ArticleManager.getList();
        },
        methods: {
            articleClick(id) {
                var payload = { path: 0, params: id };
                EventBus.$emit('link-changed', payload);
            }
        }
    }
});